﻿using BlogModels;
using bTools;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Init
{
    class Program
    {
        static void Main(string[] args)
        {
            Database.SetInitializer(new SampleData());

            BlogsDbContext db = new BlogsDbContext();
            string pwd = MyMd5.MD5Encrypt32("123456");
            var admin = db.Admins.Where(a => a.Acc == "admin" && a.Pwd == pwd).FirstOrDefault();
            if (admin != null)
            {
                Console.Write("登录成功！");

            }

            // Console.Write(pwd);

            Console.ReadKey();
        }
    }
}
